home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 028a / srep11.zip / SREP.DOC next >
Text File  |  1992-02-04  |  17KB  |  477 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                        SEARCH AND REPLACE UTILITY
  22.  
  23.                                Version 1.1
  24.  
  25.  
  26.  
  27.                    For MS-DOS Based Personal Computers
  28.  
  29.                                 ---------
  30.  
  31.  
  32.  
  33.                               User's Manual
  34.  
  35.  
  36.                   (c) 1992 O'Brien Consulting Services
  37.                               February 1992
  38.  
  39.  
  40.                              Table of Contents
  41.  
  42.  
  43.  
  44.  
  45.  
  46.      Introduction................................................1
  47.  
  48.      Installation................................................3
  49.  
  50.      Running The Program.........................................4
  51.  
  52.  
  53.  
  54.     APPENDICES:
  55.     -----------
  56.  
  57.  
  58.      Sample Audit File..........................................A
  59.  
  60.      Warranty/Disclaimer/Terms & Conditions.....................B
  61.  
  62.      Registration...............................................C
  63.  
  64.  
  65.                                                            PAGE 1
  66.  
  67.  
  68.     -- INTRODUCTION --
  69.  
  70.  
  71.     This SEARCH AND REPLACE product allows a user to do massive search
  72.     and/or replace operations.  Nearly all editors provide this for one
  73.     file at a time, but this product can do this for all files in an
  74.     entire path and/or drive.  While this product is targeted at
  75.     system developers and programmers, the casual user may find it of
  76.     use also.
  77.  
  78.     The program, SREP.EXE, is easy to use.  Field level help is
  79.     available at any time by pressing the F1 key.  The ESCAPE key
  80.     can be used at any point, even while the search and/or replace
  81.     is running.  All in all, a very user friendly program.
  82.  
  83.     The program does its best at identifying text files.  If a
  84.     binary file, such as an executable file like COM or EXE is
  85.     encountered, a message is displayed and you must press enter
  86.     to continue.  It is possible for the program to think a binary
  87.     file is actually a text file.  This is generally not a problem
  88.     since you would usually run the program against text files
  89.     like BAT, C, COB, BAS or ASM rather than EXE or COM files.
  90.  
  91.     The program runs in one of 3 modes; SEARCH, REPLACE or
  92.     SIMULATE.  Search mode simply finds all files that contain
  93.     the search string you specify.  Replace mode will actually
  94.     change the files where the search string is found.  Simulate
  95.     will run exactly like Replace except that the files will not
  96.     be updated.
  97.  
  98.     Regardless of the run mode, an audit file may be created and
  99.     can contain either a summary of the files that contain the
  100.     search string or can contain detail on each line containing the
  101.     search string before and after the replace.
  102.  
  103.     Replace mode actually changes files and will run longer than
  104.     the Search or Simulate mode.  This is because a temporary file
  105.     is created containing the changed records and those that were
  106.     not changed.  If any records in the file were changed, the
  107.     original file is overwritten with the temporary file.  If the
  108.     escape key is pressed during the overwrite, the overwrite WILL
  109.     FINISH before responding to the escape key.  You can safely
  110.     press the escape key any time and not worry about partially
  111.     updated files.
  112.  
  113.  
  114.                                                            PAGE 2
  115.  
  116.  
  117.     -- INTRODUCTION --  (continued)
  118.  
  119.  
  120.     The replace mode will run much faster if you run the program from
  121.     a ram or virtual disk.  This is because the temporary file created
  122.     is created in the current directory.
  123.  
  124.     It is STRONGLY suggested that you do the following BEFORE running
  125.     the program in replace mode:
  126.  
  127.         1. Run the program in simulate mode and then check the audit
  128.            file for correctness.
  129.  
  130.         2. Back up or make a copy of all the files that will be
  131.            changed prior to running the program in replace mode.
  132.  
  133.  
  134.                                                            PAGE 3
  135.  
  136.  
  137.     -- INSTALLATION --
  138.  
  139.  
  140.     Copy the SREP.EXE and SREP.HLP (help file) into some directory
  141.     that is located in your PATH statement.  Most users have a
  142.     UTILITY directory, which would make an excellent choice.
  143.  
  144.     The help file (SREP.HLP) has to be in the same directory as
  145.     SREP.EXE.  SREP.EXE looks for the help file in the directory
  146.     where SREP.EXE was loaded from.  If you run the program from
  147.     D:\TC20\PROGRAMS for example and SREP.EXE resides in the
  148.     C:\UTIL directory, SREP.EXE will look for SREP.HLP in the
  149.     C:\UTIL directory.
  150.  
  151.     If you put the files into its own directory, make sure you
  152.     add that directory to your PATH statement in your
  153.     AUTOEXEC.BAT file.
  154.  
  155.  
  156.                                                            PAGE 4
  157.  
  158.  
  159.     -- RUNNING THE PROGRAM --
  160.  
  161.  
  162.     Type SREP at the command prompt to start the program.  From
  163.     there you following fields must be supplied:
  164.  
  165.     PATH FOR FILES
  166.         Enter the full path name of where the files to be searched
  167.         and/or replaced are located.  Use C:\ for root directories
  168.         or C:\COBOL\PROGRAMS for sub directories for example.
  169.         If you want to search the current directory, leave this
  170.         field blank.
  171.  
  172.     INCLUDE SUB-DIRS
  173.         Enter a 'Y' if sub-directories should be searched also,
  174.         enter a 'N' if not.
  175.  
  176.     FILE SPECS
  177.         Up to 3 file specifications can be supplied.  You can
  178.         use all the standard DOS wildcards.  Examples of valid
  179.         file specifications are *.C, CH??.B??, RD*.BAT, SREP.*
  180.         and so on.
  181.  
  182.     SEARCH STRING
  183.         Enter the string you wish to search for.  The string can
  184.         contain virtually any text.
  185.  
  186.     SEARCH STRING LENGTH
  187.         Enter the length of the string you want to search for.
  188.         If this field is zero you can press CTRL-ENTER and the
  189.         field length will be calculated for you.  You only need
  190.         to change this if the field to be searched contains
  191.         trailing spaces.
  192.  
  193.     ACTION
  194.         SEARCH   - This will only find the files that contain
  195.                    the search string. The audit file will
  196.                    contain a list of files that the string
  197.                    was found in as well as each record that
  198.                    contains the search string.
  199.         REPLACE  - This will find and replace the search
  200.                    string with the new string.  The audit file
  201.                    will contain a list of the files that the
  202.                    string was found in as well as each record
  203.                    that contains the search string and an
  204.                    image of the changed record.
  205.         SIMULATE - This functions just like REPLACE except
  206.                    that no updates are actually performed.
  207.  
  208.  
  209.                                                            PAGE 5
  210.  
  211.  
  212.     -- RUNNING THE PROGRAM --  (continued)
  213.  
  214.  
  215.     AUDIT TRAIL FILE NAME
  216.         Enter the path and file name of where the audit file
  217.         is to be created.  If no audit file is desired, set
  218.         this field to blanks.
  219.  
  220.     IN DETAIL OR SUMMARY
  221.         The audit file will always contain the names of the files
  222.         that the search string was found in.  If this field is set
  223.         to DETAIL, then each record the search string was found in
  224.         will be displayed as well as the changed string if a new
  225.         string was entered.  If this field is set to SUMMARY, then
  226.         only the file name will be audited.
  227.  
  228.     NEW STRING
  229.         Enter the string you wish the search string to be changed
  230.         to.  The string can contain virtually any text.  If this
  231.         field is left blank and its length is zero, the search field
  232.         will essentially be eliminated.
  233.         This field is not required if you are only searching.
  234.  
  235.     NEW STRING LENGTH
  236.         Enter the length of the new string.  If this field is
  237.         zero you can press CTRL-ENTER and the field length will
  238.         be calculated for you.  You only need to change this if
  239.         the new field contains trailing spaces.
  240.  
  241.     IS CASE SIGNIFICANT
  242.         If the search string has to be found in the exact
  243.         upper/lower case as it was supplied enter a 'Y'.  If
  244.         the search string can be found regardless of case
  245.         enter a 'N'.
  246.  
  247.  
  248.                                                            APPENDIX A
  249.  
  250.  
  251.     -- SAMPLE AUDIT FILE --
  252.  
  253.  
  254. --------------------------------------------------------------------------------
  255.  
  256.          O'Brien Consulting Services
  257.  Search and Replace Utility  v1.1  (C) 1992
  258.  
  259. --------------------------------------------------------------------------------
  260.  
  261.  Input parameters:
  262.      Path For Files:           D:
  263.      Include Sub-directories:  Y
  264.      File Specs:               *.C  *.H
  265.      Search String:            <HELP_>
  266.      Search String Length:     5
  267.      New    String:            <HLP_INDEX_>
  268.      New    String Length:     10
  269.      Action:                   Simulate - Log shows updates, but none done
  270.      Audit Trail File Name:    SREP.LOG, In Detail
  271.      Is CaSe SiGnIfIcAnT?:     N
  272.  
  273.  
  274. D:\MAJOR\ORDENTRY\EDIT.C
  275.      [363     ] From:     whelppcat(HELP_EDIT);
  276.                   To:     whelppcat(HLP_INDEX_EDIT);
  277.  
  278. D:\MAJOR\ORDENTRY\UPLOAD.C
  279.      [147     ] From:     whelppcat(HELP_UPLOAD_FILE);
  280.                   To:     whelppcat(HELP_INDEX_UPLOAD_FILE);
  281.  
  282. D:\MAJOR\ORDENTRY\ALL.H
  283.      [3       ] From: #define HELP_MAIN                   1
  284.                   To: #define HELP_INDEX_MAIN                   1
  285.      [4       ] From: #define HELP_UPLOAD_FILE            2
  286.                   To: #define HELP_INDEX_UPLOAD_FILE            2
  287.      [5       ] From: #define HELP_COMMANDS               3
  288.                   To: #define HELP_INDEX_COMMANDS               3
  289.      [6       ] From: #define HELP_ADD_ORDER              4
  290.                   To: #define HELP_INDEX_ADD_ORDER              4
  291.      [7       ] From: #define HELP_ADD_ORDER_NAME         5
  292.                   To: #define HELP_INDEX_ADD_ORDER_NAME         5
  293.      [8       ] From: #define HELP_ADD_ORDER_DESC         6
  294.                   To: #define HELP_INDEX_ADD_ORDER_DESC         6
  295.      [9       ] From: #define HELP_COPY_ORDER             7
  296.                   To: #define HELP_INDEX_COPY_ORDER             7
  297.      [10      ] From: #define HELP_COPY_ORDER_NAME        8
  298.                   To: #define HELP_INDEX_COPY_ORDER_NAME        8
  299.  
  300.  
  301.                                                            APPENDIX B
  302.  
  303.  
  304.     -- WARRANTY/DISCLAIMER/TERMS & CONDITIONS --
  305.  
  306.  
  307.     O'Brien Consulting Services warrants to the original purchaser of
  308.     this computer software product that the recording media on which
  309.     the programs are recorded will be free from defects in material
  310.     and workmanship for ninety (90) days from the date of purchase.
  311.     Defective media returned by the purchaser within ninety (90) days
  312.     will be replaced without charge provided the returned media have
  313.     not been subjected to misuse, damage, or excessive wear.
  314.  
  315.     O'Brien Consulting Services does NOT warrant that the programs
  316.     will meet the purchaser's specific requirements.  ANY STATEMENTS
  317.     MADE REGARDING THE UTILITY OF THE PROGRAMS ARE NOT TO BE
  318.     CONSTRUED AS EXPRESS OR IMPLIED WARRANTIES.
  319.  
  320.     THIS WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES, WHETHER WRITTEN
  321.     OR ORAL, EXPRESSED OR IMPLIED. ANY IMPLIED WARRANTIES, INCLUDING
  322.     IMPLIED WARRANTIES OF MECHANTABILITY AND FITNESS FOR A SPECIFIC
  323.     PURPOSE ARE EXCLUDED.
  324.  
  325.     IN NO EVENT WILL O'BRIEN CONSULTING SERVICES BE LIABLE FOR
  326.     INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND IN CONNECTION
  327.     WITH THE SOFTWARE PRODUCT.
  328.  
  329.  
  330.     Registered copies of SEARCH AND REPLACE UTILITY may be purchased
  331.     by completing the attached registration form and send it with a
  332.     check for $25.00 per copy (quantity discounts, network pricing,
  333.     and site licenses also available) to O'Brien Consulting Services
  334.     at the address given.  Purchase orders will be accepted subject
  335.     at all times to approval of O'Brien Consulting Services. Terms of
  336.     payment for orders received via purchase order are due net 30
  337.     days.
  338.  
  339.     O'Brien Consulting Services shall not be liable for delays in
  340.     performance caused by riots, strikes, floods, accidents, or any
  341.     other contingency beyond its control.
  342.  
  343.     Accepted orders are subject to cancellation charges to the extent
  344.     O'Brien Consulting Services shall be reimbursed for the cost of
  345.     reasonable expense incurred prior to the cancellation as a result
  346.     of order acceptance.
  347.  
  348.  
  349.                                                            APPENDIX B
  350.  
  351.  
  352.     -- WARRANTY/DISCLAIMER/TERMS & CONDITIONS --  (continued)
  353.  
  354.  
  355.     SEARCH AND REPLACE UTILITY distribution package, consisting of
  356.     the program and documentation files are copyright (c) 1992 by
  357.     O'Brien Consulting Services.  The author reserves the exclusive
  358.     right to distribute this product, or any part thereof, for
  359.     profit.
  360.  
  361.     Under NO CIRCUMSTANCES may modified versions or disassembled
  362.     versions be distributed, either for profit or in the public
  363.     domain.
  364.  
  365.  
  366.     User's groups, clubs, libraries and clearing houses are
  367.     authorized to distribute the FREE version of SEARCH AND REPLACE
  368.     UTILITY pursuant to the following conditions:
  369.  
  370.         1.  No charge is made for the software or documentation.  A
  371.             nominal distribution fee may be charged, provided that it
  372.             is no more that $7 total.
  373.  
  374.         2.  The program and documentation are distributed together and
  375.             are not modified in ANY way.
  376.  
  377.  
  378.                                                            APPENDIX C
  379.  
  380.  
  381.     -- REGISTRATION --
  382.  
  383.  
  384.     Once you become a registered user of SEARCH AND REPLACE UTILITY
  385.     you will receive the following benefits:
  386.  
  387.           o   Support by phone, mail, or through our bulletin board
  388.               system.  Support will only be provided to registered
  389.               users.
  390.  
  391.           o   Notice of significant upgrades and bug fixes.  You will
  392.               be notified by mail for any such updates.  There will be
  393.               no charge for updates as long as you send us a diskette
  394.               and return postage.  You can also receive a free update
  395.               through our bulletin board.
  396.  
  397.  
  398.     Each copy of SEARCH AND REPLACE UTILITY is registered for use on
  399.     one computer only and a registered copy is required for each
  400.     additional computer.  The price breakdown is given below:
  401.  
  402.  
  403.        Copies                 Price Per Copy
  404.       --------               ----------------
  405.          1-50                      $25.00
  406.        51-100                      $21.00
  407.       101-500                      $18.00
  408.           500+                     $16.00
  409.  
  410.  
  411.     The price for networks $100.00 for each file server and $5.00
  412.     for each computer (node) on the network.
  413.  
  414.  
  415.     The registered version of SEARCH AND REPLACE UTILITY can be used
  416.     in commercial, educational, and governmental institutions.
  417.  
  418.     The free version of SEARCH AND REPLACE UTILITY is expressly
  419.     prohibited for use in commercial, educational, and governmental
  420.     institutions except for the purpose of evaluation.
  421.  
  422.  
  423.                                                            APPENDIX C
  424.  
  425.  
  426.     -- REGISTRATION --  (continied)
  427.  
  428.  
  429.     Please send me a copy of the current full version of SEARCH AND
  430.     REPLACE UTILITY and add me to the list of registered users, to be
  431.     eligible for support and update notices.
  432.  
  433.      Computer Model: _____________________________________________
  434.  
  435.                                -----Quantity by diskette type-----
  436.  
  437.      SEARCH AND REPLACE UTILITY _______ 5.25 in.  ________ 3.5 in.
  438.  
  439.  
  440.      May we send you high-density diskettes?     _____(yes)    _____(no)
  441.  
  442.      Company Name: _____________________________________________
  443.  
  444.      Your Name:    _____________________________________________
  445.  
  446.      Title:        _____________________________________________
  447.  
  448.      Address:      _____________________________________________
  449.  
  450.      City, State, Zip: _________________________________________
  451.  
  452.      Phone:        _____________________________________________
  453.  
  454.  
  455.      Any initial comments about SEARCH AND REPLACE UTILITY?
  456.      ___________________________________________________________
  457.      ___________________________________________________________
  458.      ___________________________________________________________
  459.  
  460.  
  461.      Where did you hear about SEARCH AND REPLACE UTILITY?
  462.      ___________________________________________________________
  463.      ___________________________________________________________
  464.      ___________________________________________________________
  465.  
  466.  
  467.      May we use your comments and/or name in future literature for
  468.      O'Brien Consulting Services products?   _____(yes)  _____(no)
  469.  
  470.      Send registration form and check or money order to:
  471.  
  472.                    O'Brien Consulting Services
  473.                    P.O. Box 742
  474.                    Mequon, Wi.  53092
  475.                    (414) 241-9504 - Voice
  476.                    (414) 241-9125 - Data  (9600,N,8,1)
  477.